import java.awt.*;

public class Ship
	{
		private final int			finalPlanetIndex;
		private final Point					startPosition;
		private final double	stegLx;
		private final double	stegLy;
		private Color					color;
		private int countPassedMowement =0;
		
		public Ship(int x, int y, int finalPlanetIndex, Color c, double lx, double ly)
			{
				this.startPosition = new Point(x, y);
				this.finalPlanetIndex = finalPlanetIndex;
				color = c;
				stegLx = lx;
				stegLy = ly;
			}
		
		public Ship()
			{
				this(0, 0, 0, null, 0, 0);
			}
		
		public static boolean krock(Ship s1, Planet p2)
			{
				boolean b = false;
				for (int j = 0; j < p2.getPointsOnFrame().size(); j++)
					{
						if (s1.startPosition.x == p2.getPointsOnFrame().get(j).x && s1.startPosition.y == p2.getPointsOnFrame().get(j).y)
							{
								b = true;
							}
					}
				return b;
			}
		
		public Color getColor()
			{
				return color;
			}
		
		public void setColor(Color color)
			{
				this.color = color;
			}
		
		/**
		 * @return the stegLx
		 */
		public double getStegLx()
			{
				return stegLx;
			}
		
		/**
		 * @return the stegLy
		 */
		public double getStegLy()
			{
				return stegLy;
			}
		/**
		 * @return the finalPlanetIndex
		 */
		public int getFinalPlanetIndex()
			{
				return finalPlanetIndex;
			}

		/**
		 * @return the countPassedMowement
		 */
		public int getCountPassedMowement()
			{
				return countPassedMowement;
			}

		/**
		 * @param countPassedMowement the countPassedMowement to set
		 */
		public void updateCountPassedMowement()
			{
				this.countPassedMowement++;
			}

		/**
		 * @return the startPosition
		 */
		public Point getStartPosition()
			{
				return startPosition;
			}
	}
